<?php include_once("../../../common/common_setting_unit.php");         // 引入通用的设置文件 ?>
<?php include_once(ROOT_PATH_ . "/controller/common/module/head.php"); // 引入通用的头部 ?>
<?php include_once("../controller/data_list.php");                     // 当前页面的控制器 ?>



<body>

<!--顶部栏-->
<div id="topbar"> <?php include ROOT_PATH_ . '/controller/common/module/topbar.php'; ?></div>

<!--容器-->
<div id="container" class="<? echo $now_extender ?>">

<!--侧边栏-->
<div id="sidebar"><?php include ROOT_PATH_ . '/controller/common/module/sidebar.php'; ?></div>





        <?
        //==============================================================================
        //这里开始才是平常开发需要注重的部分，其余的基本不用理会
        //==============================================================================
        ?>

  
        <div id="content" class="layui-form">

            <!--标题设定-->
            <?php $page_title='网站列表';?>
            <?php include ROOT_PATH_ . '/controller/common/module/mod-page-title.php'; ?>

            <!--搜索框-->
            <?php include 'module/mod-search.php'; ?>


            <!-- 用$now_extender .list_boxe来控制来到确认板块信息显示-->
            <div class="list-box">
     
                    <table class="layui-table ">
                        <colgroup>
                            <col width="20" >
                            <col  >
                            <col  >
                            <col  >
                            <col  >
                            <col  >
                            <col width="250" >
                        </colgroup>
                        <thead>
                        <tr>
                            <th  class="layui-table-cell"><input type="checkbox"  lay-skin="primary" id="check_all"  ></th>
                            <th><div class="els2">网站</div></th>
                            <th><div class="els2">域名</div></th>
                            <th><div class="els2">文件夹</div></th>
                            <th><div class="els2">状态</div></th>
                            <th><div class="els2">账户</div></th>
                            <th><div class="els2">时间</div></th>
                            <th><div class="els2">操作</div></th>

                        </tr>
                        </thead>
                        <tbody>


                        <?php for ($i = 0; $i < $_quantity_per_page; $i++) {?>

                            <tr id="item<? echo $data['data_list'][$i]['nid'] ?>">

                                <td id="<? echo $i + 1 + $plate['page_list_num'] * ($nowpageid - 1) ?>" class="layui-table-cell">
                                        <input type="checkbox" name="nid[]" lay-skin="primary"  value="<? echo $data['data_list'][$i]['nid'] ?>">
                                </td>

                                <td><div class="els2"><? echo $data['data_list'][$i]['name'] ?></div></td>

                                <td><div class="els2"><? echo $data['data_list'][$i]['domain'] ?></div></td>
                                <td><div class="els2"><? echo $data['data_list'][$i]['theme_folder'] ?></div></td>
                                <td><div class="els2"><? echo $data['data_list'][$i]['status'] ?></div></td>

                                <td><div class="els2">
                                        <a href="http://<?echo $data['data_list'][$i]['domain'];?>/gate" target="_blank">
                                            <? echo $data['data_list'][$i]['default_admin_status'] ?>
                                        </a>
                                    </div>
                                </td>
                                <td><div class="els2"><? echo $data['data_list'][$i]['date'] ?></div></td>
                                <td>


                                    <a href="data_edit.php?<? echo $data['url_parameter'] ?>&nid=<? echo $data['data_list'][$i]['nid'] ?>"
                                       class="layui-btn  layui-btn-sm">
                                       <i class="fa fa-bar-chart-o" aria-hidden="true"></i>修改
                                    </a>

                                    <a href="data_info.php?<? echo $data['url_parameter'] ?>&nid=<? echo $data['data_list'][$i]['nid'] ?>&nowpageid=<? echo $_REQUEST['nowpageid'] ?>"
                                       class="layui-btn  layui-btn-sm" target="_blank">
                                        <i class="fa fa-bar-chart-o" aria-hidden="true"></i>信息
                                    </a>

                                    <span
                                            onclick="deleter(<?php echo $data['data_list'][$i]['nid'] ?>,'data_delete')"
                                            class="layui-btn layui-btn-sm layui-btn-primary">
                                        <i class="layui-icon">&#xe640;</i>删除
                                    </span>
                                </td>

                                
                            </tr>
                        <?php;} ?>



                        </tbody>
                    </table>


                    <?php //无数据时显示
                    if (count($data['data_list']) == 0) { echo "暂无数据"; }
                    ?>



                    <!-- todo 这里需要做0判断-->
                    <!-- 翻页代码-->
                    <?php include 'module/page_numbers.php'; ?>


            </div>
            <!--list-box end-->


        </div>
        <!--content端點01-->
        <?
        //==============================================================================
        //这里上面才是平常开发需要注重的部分，下面的基本不用理会，只有底部JS部分需要根据实际情况去加载
        //==============================================================================
        ?>





<br class="clearfloat"/>
<!--container-->
</div>




<!--底部栏-->
<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>


<!--载入删除功能-->
<script type="text/javascript" src="/controller/common/asset/js/deleter.js"></script>




</body>
</html>
